package org.wanda.pv.model.basic;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.nutz.dao.entity.annotation.*;
import org.wanda.pv.framework.base.BaseModel;

import java.util.List;

/**
 * @author lxy
 * @date 2018/11/15 11:31
 */
@Comment("专业分类")
@Table("wd_specialty")
public class Specialty extends BaseModel{
    @Column
    @Id
    @Prev(els = {@EL("$me.idGen()")})
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @Comment("专业分类名称")
    @Column("specilty_name")
    @ColDefine(type = ColType.VARCHAR, width = 32)
    private String name;

    @Many(field = "specialtyId")
    private List<System> systems;

    @ManyMany(relation="wd_re_point_specialty",from="specialty_id",to="point_id")
    private List<Point> points;

    @Comment("专业的序号")
    @Column("specilty_sequence")
    private int sequence;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<System> getSystems() {
        return systems;
    }

    public void setSystems(List<System> systems) {
        this.systems = systems;
    }

    public List<Point> getPoints() {
        return points;
    }

    public void setPoints(List<Point> points) {
        this.points = points;
    }

    public int getSequence() {
        return sequence;
    }

    public void setSequence(int sequence) {
        this.sequence = sequence;
    }

}
